#ifndef STOCK_H
#define STOCK_H
#include <QWidget>
#include <QPainter>
#include <QtCore>
#include <QString>
#include <QObject>
#include <QMainWindow>

class Stock: public QObject
{
    Q_OBJECT

public:
    Stock(QString fileString, QString stockCode);
    QHash<QString, QString> listRow;
    QList<QHash<QString, QString> > fileData;
    QList<QHash<QString, QString> > predictorData;
    QHash<QString, QString> getLastLineRead();
    QHash<QString, QString> getFirstLineRead();
    QString getHighestStockReading();
    QString getLowestStockReading();
    void setHighestStockReading(QString highestValue);
    void addPredictorDataToStock(QHash<QString, QString> data);

private:
    QHash<QString, QString> lastLineRead;
    QHash<QString, QString> firstLineRead;
    QString stockHighestValue;
    QString stockLowestValue;

    void setLowestStockReading(QString lowestValue);
    void setLastLineRead(QHash<QString, QString> lastLine);
    void setFirstLineRead(QHash<QString, QString> lastLine);
signals:
    void sendSignalToPaintEvent();
};

#endif // STOCK_H
